<%@page errorPage="error.jsp" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" %>
<%@ page import="java.io.StringWriter" %>
<%@ page import="java.io.PrintWriter" %>
<%@include file="/WEB-INF/pages/commons/commons.jsp" %>


<stripes:layout-render name="${_themePath}/basic-layout-without-navbar.jsp" _title="Login">

    <stripes:layout-component name="_head">
        <c:out value="${_head}" escapeXml="false"/>
        <meta name="_uniquePageId_" content="_login_"/>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#username").focus();
            });
        </script>
    </stripes:layout-component>
    
    <stripes:layout-component name="_topNav">
        <H1>Login</H1>
        <UL class="gc-topnav-tabs">
            <LI>&nbsp;</LI>
        </UL>
    </stripes:layout-component>

    <stripes:layout-component name="_content">
            <h2>&nbsp;</h2>
            <center>
                <c_rt:if test="<%=request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME) != null%>">
                        <fmt:message key="stripes.errors.header"/>
                        <fmt:message key="stripes.errors.beforeError"/>
                        <fmt_rt:message key="<%=(String)request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME)%>"/>
                        <fmt:message key="stripes.errors.afterError"/>
                        <fmt:message key="stripes.errors.footer"/>
                </c_rt:if>

                <stripes:messages/>
                <stripes:errors />
            <stripes:form beanclass="foo.bar.wiki.web.action.general.LoginActionBean">
            <table>
                <tr>
                    <td>Username:</td>
                    <td><stripes:text id="username" name="username" tabindex="0" /></td>
                </tr>
                <tr>
                    <td>Password:</td>
                    <td><stripes:password name="password"/></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <stripes:checkbox name="rememberMe"/>Remember Me
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <stripes:submit name="login">Login</stripes:submit>
                    </td>
                </tr>
            </table>
            </stripes:form>    
            </center>
    </stripes:layout-component>
</stripes:layout-render>
